<template>
  <view class="content">
    <image class="logo" src="/static/logo.png" />
    <view class="text-area">
      <text class="title">{{ title }}</text>
    </view>
    <tui-button>页面主操作</tui-button>
    <tui-button type="warning" @click="showToast">页面次要操作</tui-button>
    <tui-button type="danger">页面次要操作</tui-button>
    <div class="!w-32">
      <tui-button type="gray-primary">页面次要操作</tui-button>
    </div>
    <div class="h-10 bg-red-700" style="width: 750rpx"></div>
    <div class="logo"></div>
  </view>
</template>

<script setup lang="ts">
import { ref, getCurrentInstance } from "vue"
import useCurrentInstance from "@/hooks/useCurrentInstance"

const { globalProperties } = useCurrentInstance()
// const {
//   appContext: {
//     config: { globalProperties: global },
//   },
// } = getCurrentInstance()!;
const title = ref("Hello")
const showToast = () => {
  globalProperties.tui.toast("zzzzzzzzzzz")
}
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 100px;
  width: 750rpx;
  margin-top: 100px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 10px;
  background-color: #ddd;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
